#include "qqmusic.h"

#include <QApplication>
#include<QMessageBox>
#include<QSharedMemory>

int main(int argc, char *argv[])
{
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
    QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
    QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
    QApplication a(argc, argv);
    QSharedMemory shareMemory("QQMusic");
    if(shareMemory.attach())
    {
        QMessageBox::information(nullptr,"QQMusic","QQMusic运行中...");
        return 0;
    }
    shareMemory.create(1);
    QQMusic w;
    w.show();
    return a.exec();
}
